﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ZSens
{
    /// <summary>
    /// Interaction logic for Help.xaml
    /// </summary>
    public partial class Help : Window
    {
        private string[] tips;
        private int idx = 0;
        public Help()
        {
            InitializeComponent();
            tips = new string[6];
            InitializeTips();
            DisplayTip();
        }

        private void InitializeTips()
        {
            tips[5] = @"Images/zsens-apply.png";
            tips[2] = @"Images/zsens-game-ui.png";
            tips[3] = @"Images/zsens-map.png";
            tips[1] = @"Images/zsens-mobile-list.png";
            tips[4] = @"Images/zsens-orient.png";
            tips[0] = @"Images/zsens-ui.png";
        }

        private void DisplayTip()
        {
            Uri uri = new Uri(tips[idx], UriKind.Relative);

            Tip.Source = new BitmapImage(uri);
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            idx = (idx + 1) % 6;
            DisplayTip();
        }

        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            if (idx == 0)
                idx = 5;
            else
                idx--;
            DisplayTip();
        }
    }
}
